<template>
  <div class="back-nav">
    <van-nav-bar
      :title="title"
      :left-text="leftText"
      :right-text="rightText"
      :left-arrow="leftArrow"
      @click-left="back"
      @click-right="go"
    />
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "",
    },
    leftText: {
      type: String,
      default: "",
    },
    rightText: {
      type: String,
      default: "",
    },
    leftArrow: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
    go(){
      this.$emit('gopage')
    }
  },
};
</script>
<style lang="less" scoped>
.back-nav {
  /deep/ .van-nav-bar .van-icon {
    color: #0c34ba;
  }
  /deep/ .van-nav-bar__text {
    color: #0c34ba;
  }
}
</style>